package com.customview;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;

import com.customview.CustomLine.Activity_CustomLine;
import com.customview.RadarView.RadarView;
import com.customview.custmoCircle.Activity_CircleImage;

public class MainActivity extends Activity {


    private String TAG=this.getClass().getName();

    RadarView radaview;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//隐藏标题栏
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//隐藏状态栏

        setContentView(R.layout.activity_main);
//        TitleBarLayout titleBar = (TitleBarLayout) findViewById(R.id.bar);
//        titleBar.setimgListenr(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                ((ImageView)v).setImageBitmap(BitmapFactory.decodeResource(getResources(),R.mipmap.icon_flag));
//
//            }
//        });
//        titleBar.setTv_title("xxxxxx");

        radaview= (RadarView) findViewById(R.id.radaview);
        radaview.start();

    }

       public void test(View view)
       {
           switch (view.getId())
           {
               case R.id.btn1:
           startActivity(new Intent(this, Activity_CircleImage.class));
               break;

               case R.id.btn2:
           startActivity(new Intent(this, Activity_CustomLine.class));
               break;

           }

       }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        return true;
    }



    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        return super.dispatchTouchEvent(ev);
    }
}
